home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / urt / amiga_extras / getami / ispal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-04  |  700 b   |  36 lines

  1. #include <exec/types.h>
  2. #include <exec/libraries.h>
  3. #include <intuition/intuition.h>
  4. #include <graphics/gfxbase.h>
  5.  
  6. #ifdef __SASC
  7. #include <proto/intuition.h>
  8. #include <proto/graphics.h>
  9. #endif
  10.  
  11. #ifdef __GNUC__
  12. #include <inline/intuition.h>
  13. #include <inline/graphics.h>
  14. #endif
  15.  
  16. extern struct GfxBase *GfxBase;
  17.  
  18. int
  19. IsPAL(void)
  20. {
  21.   struct Screen *s;
  22.   ULONG mode;
  23.  
  24.   s = LockPubScreen("Workbench");
  25.   mode = GetVPModeID(&(s->ViewPort));
  26.   UnlockPubScreen(NULL, s);
  27.   if ((mode & PAL_MONITOR_ID) == PAL_MONITOR_ID){
  28.     return TRUE;
  29.   }
  30.   if ((mode & NTSC_MONITOR_ID) == NTSC_MONITOR_ID){
  31.     return FALSE;
  32.   }
  33.   /* Used to be this simple... */
  34.   return (GfxBase->DisplayFlags & PAL) ? TRUE : FALSE;
  35. }
  36.